@echo off
REM   Copyright 2012 University of Southampton
REM
REM   Licensed under the Apache License, Version 2.0 (the "License");
REM   you may not use this file except in compliance with the License.
REM   You may obtain a copy of the License at
REM
REM       http://www.apache.org/licenses/LICENSE-2.0
REM
REM   Unless required by applicable law or agreed to in writing, software
REM   distributed under the License is distributed on an "AS IS" BASIS,
REM   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM   See the License for the specific language governing permissions and
REM   limitations under the License.
@echo on


msbuild HDCMetadataSyncService\HDCMetadataSyncService.sln
msbuild HDCConfiguration\HDCConfiguration.sln
msbuild HDCSharePointToolkit\HDCSharePointToolkit.sln
msbuild HDCSharePointToolkit\HDCSharePointToolkit\HDCSharePointToolkit.csproj /t:package
msbuild HDCSharePointToolkitDeploy\HDCSharePointToolkitDeploy.sln
msbuild HDCDataAccess\HDCExperimentDataFilePlugins_dotnetfx35\HDCExperimentDataFilePlugins_dotnetfx35.sln
msbuild HDCDataAccess\HDCExperimentPlugins_dotnetfx35\HDCExperimentPlugins_dotnetfx35.sln
msbuild HDCDataAccess\HDCMetadataSyncServicePlugins_dotnetfx40\HDCMetadataSyncServicePlugins_dotnetfx40.sln


@echo.
@echo Compiling completed. Copying files to HDCInstaller directory next and creating installer.

@rem @echo.
@rem @echo Copying built files to MDCInstaller\SourceFilesForHDCInstaller
@rem robocopy HDCMetadataSyncService\HDCMetadataSyncService\bin\Debug HDCInstaller\SourceFilesForHDCInstaller\HDCMetadataSyncService *.* /v
@rem robocopy HDCConfiguration\HDCConfiguration\bin\Debug HDCInstaller\SourceFilesForHDCInstaller\HDCConfiguration *.* /v
@rem robocopy HDCConfiguration\HDCDatabaseCreator HDCInstaller\SourceFilesForHDCInstaller\HDCConfiguration *.sql /v
@rem robocopy HDCSharePointToolkit\HDCSharePointToolkit\bin\Debug HDCInstaller\SourceFilesForHDCInstaller\HDCSharePointToolkit *.* /v
@rem robocopy HDCDataAccess\HDCExperimentDataFilePlugins_dotnetfx35\HDCExperimentDataFilePlugin_Thumbnail\bin\Debug HDCInstaller\SourceFilesForHDCInstaller\HDCPlugins *.* /v
@rem robocopy HDCDataAccess\HDCExperimentDataFilePlugins_dotnetfx35\HDCExperimentDataFilePlugin_ConfigFile\bin\Debug HDCInstaller\SourceFilesForHDCInstaller\HDCPlugins *.* /v
@rem robocopy HDCDataAccess\HDCExperimentPlugins_dotnetfx35\HDCExperimentPlugin_Report\bin\Debug HDCInstaller\SourceFilesForHDCInstaller\HDCPlugins *.* /v
@rem robocopy HDCSharePointToolkitDeploy\HDCSharePointToolkitDeploy\bin\x64\Debug HDCInstaller\SourceFilesForHDCInstaller\HDCSharePointToolkitDeploy *.* /v

@echo Compiling HDCInstaller
@rem We must now use devenv to compile the MDCInstaller because MSBUILD doesn't support .vdproj files!
devenv HDCInstaller\HDCInstaller.sln /build

@echo.
@echo Complete. Output is in HDCInstaller\HDCInstaller_Wizard\Debug
